// Copyright (c) 2024, the Dart project authors.
// All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of 'types.dart';

/// A high level wrapper over an Ark class reference.
class ArkClass extends ArkObject {
  ArkClass.fromReference(ArkReference reference) : super(reference.pointer);

  ArkClass.forName(String name)
      : super(Napi.findClass(name));

  // Simple method stubs - TODO: implement actual Napi functionality
  String get name => 'ArkClass';
  
  // Constructor ID lookup - TODO: implement actual Napi functionality
  String constructorId(String signature) {
    return 'constructor_$signature';
  }
  
  // Instance method ID lookup - TODO: implement actual Napi functionality
  String instanceMethodId(String name, String signature) {
    return 'method_${name}_$signature';
  }
  
  // Static method ID lookup - TODO: implement actual Napi functionality
  String staticMethodId(String name, String signature) {
    return 'static_${name}_$signature';
  }
  
  // Instance field ID lookup - TODO: implement actual Napi functionality
  String instanceFieldId(String name, String signature) {
    return 'field_${name}_$signature';
  }
  
  // Static field ID lookup - TODO: implement actual Napi functionality
  String staticFieldId(String name, String signature) {
    return 'static_field_${name}_$signature';
  }
  
  @override
  String toString() => 'ArkClass($reference)';
}